Repository navigation
ci: exclude generated code from coverage - #599
Merged
jcogilvie merged 1 commit intoNov 24, 2026
Merged
Conversation
Coverage counted controller-gen's deepcopy functions and protoc's render output as uncovered production code (about 400 lines on main). Ignore zz_generated.*.go and *.pb.go alongside testutils. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Signed-off-by: Jonathan Ogilvie <jonathan.ogilvie@sumologic.com>
Codecov Report✅ All modified and coverable lines are covered by tests. 🚀 New features to boost your workflow:
|
adamwg
approved these changes
Nov 24, 2026
This was referenced Nov 24, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description of your changes
Ignore generated code in Codecov.
apis/dev/v1alpha1/zz_generated.deepcopy.go(controller-gen) andproto/render/v1alpha1/render.pb.go(protoc) made up about 400 of the ~6,500 uncovered lines onmain, and nothing in this repo should test them directly.The patterns match by filename (
**/zz_generated.*.go,**/*.pb.go), not by theCode generated ... DO NOT EDITheader.internal/schemas/generator/go.gocontains that header as a template string, and it's hand-written code we do want measured. Codecov's validator accepts the file.This is one of several PRs that improve test coverage:
I have:
RunCodecov config only../nix.sh flake checkto ensure this PR is ready for review.Added or updated unit tests.Codecov config only.Linked a PR or a docs tracking issue to document this change.Not user-facing.Addedbackport release-x.ylabels to auto-backport this PR.🤖 Generated with Claude Code